
function Login() {
  return "/manageUser/login"
}
//获取串口配置
function GetSerialInfo() {
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('GET', '/Serial/GetSerialInfo', null, null, function (response) {
      resolve(response.data);
    });
  });
}
//获取采集周期
function GetTPITV() {
  var url = "/Serial/GetTPITV"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('GET', url, null, null, function (response) {
      resolve(response);
    });
  });
}
//修改采集周期
function EidtTPITV(data) {
  var url = "/Serial/EidtTPITV"
  sendAjaxRequest('POST', url, data, null, function (response) { });
}
//修改串口信息
function EditSeria(data) {
  var url = "/Serial/EditSeria"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, null, function (response) {
      resolve(response);
    }, 1);
  });
}
//修改地址信息
function EditSeriaSlave(data) {
  var url = "/Serial/EditSeriaSlave"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, null, function (response) {
      resolve(response);
    }, 1);
  });
}
//修改功能码
function EidtSeriaSlaveDetail(data) {
  var url = "/Serial/EidtSeriaSlaveDetail"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, null, function (response) {
      resolve(response);
    }, 1);
  });
}
//删除串口信息
function DeleteSeria(data) {
  var url = "/Serial/DeleteSeria"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, 'application/x-www-form-urlencoded;', function (response) {
      resolve(response);
    });
  });
}
//删除地址信息
function DeleteSeriaSlave(data) {
  var url = "/Serial/DeleteSeriaSlave"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, 'application/x-www-form-urlencoded;', function (response) {
      resolve(response);
    });
  });
}
//删除功能码
function DeleteSlaveDetail(data) {
  var url = "/Serial/DeleteSeriaSlaveDetail"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, 'application/x-www-form-urlencoded;', function (response) {
      resolve(response);
    }, 1);
  });
}


//获取上行平台信息
function GetDeviceInfo() {
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('GET', '/DeviceInfo/GetDeviceInfo', null, null, function (response) {
      resolve(response.data);
    });
  });
}
//修改上行平台信息
function EditDeviceInfo(data) {
  var url = "/DeviceInfo/EditDeviceInfo"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, null, function (response) {
      resolve(response);
    }, 1);
  });
}
//修改集中器信息
function EditDeviceInfo_Concentrator(data) {
  var url = "/DeviceInfo/EditDeviceInfo_Concentrator"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, null, function (response) {
      resolve(response);
    }, 1);
  });
}
//修改集中器-用户表信息
function EditDeviceInfo_Concentrator_User(data) {
  var url = "/DeviceInfo/EditDeviceInfo_Concentrator_User"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, null, function (response) {
      resolve(response);
    }, 1);
  });
}

//删除上行平台信息
function DeleteDeviceInfo(data) {
  var url = "/DeviceInfo/DeleteDeviceInfo"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, 'application/x-www-form-urlencoded;', function (response) {
      resolve(response);
    });
  });
}
//删除上行平台信息
function DeleteConcentrator(data) {
  var url = "/DeviceInfo/DeleteConcentrator"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, 'application/x-www-form-urlencoded;', function (response) {
      resolve(response);
    });
  });
}
//删除上行平台信息
function DeleteConcentratorUser(data) {
  var url = "/DeviceInfo/DeleteConcentratorUser"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, 'application/x-www-form-urlencoded;', function (response) {
      resolve(response);
    });
  });
}
//修改上行平台配置（详情）
function EditDeviceInfoDetail(data) {
  var url = "/DeviceInfo/EditDeviceInfoDetail"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, null, function (response) {
      resolve(response);
    }, 1);
  });
}
//删除上报配置(详情)
function DeleteDeviceInfoDetail(data) {
  var url = "/DeviceInfo/DeleteDeviceInfoDetail"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, 'application/x-www-form-urlencoded;', function (response) {
      resolve(response);
    });
  });
}

//下拉框获取通道信息
function GetSelectSerialInfo() {
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('GET', '/DeviceInfo/GetSelectSerialInfo', null, null, function (response) {
      resolve(response.data);
    }, 1);
  });
}

//下拉框获取通道信息
function Restart() {
  sendAjaxRequest('POST', '/Serial/Restart', null, null, function (response) { })
}

//判断tcp连接是否成功
function GetTcpConnect(data) {
  var url = "/DeviceInfo/GetTcpConnect"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, 'application/x-www-form-urlencoded;', function (response) {
      resolve(response.data);
    });
  });
}
function GetUserName() {
  var url = "/manageUser/GetUserName"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('GET', url, null, null, function (response) {
      resolve(response.data);
    });
  });
}
//修改登录账户名称
function EditUserName(data) {
  var url = "/manageUser/EditUserName"
  sendAjaxRequest('POST', url, data, 'application/x-www-form-urlencoded;', function (response) { });
}
function EditUserPassWord(data) {
  var url = "/manageUser/EditUserPassWord"
  sendAjaxRequest('POST', url, data, 'application/x-www-form-urlencoded;', function (response) { });
}
//修改系统升级信息
function EditSysUpgrade(data) {
  var url = "/System/EditSysUpgrade"
  sendAjaxRequest('POST', url, data, null, function (response) { });
}
//获取系统升级信息
function GetSysUpgrade() {
  var url = "/System/GetSysUpgrade"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('GET', url, null, null, function (response) {
      resolve(response);
    });
  });
}
//系统升级
function FTPUpgrade() {
  var url = "/System/FTPUpgrade"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, null, null, function (response) {
      resolve(response);
    });
  });
}
//删除地址信息
function ExportData(data) {
  var url = "/Serial/ExportData"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, 'application/x-www-form-urlencoded;', function (response) {
      resolve(response);
    });
  });
}
//修改以太网信息
function EditEthSetting(data) {
  var url = "/NetSet/EditEthSetting"
  // sendAjaxRequest('POST', url, data, null, function (response) { });
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, null, function (response) {
      resolve(response);
    }, 1);
  });
}
//获取以太网信息
function GetEthSettin() {
  var url = "/NetSet/GetEthSettin"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('GET', url, null, null, function (response) {
      resolve(response);
    });
  });
}
//校时
function ChangeTime(data) {
  var url = "/System/ChangeTime"
  sendAjaxRequest('POST', url, data, 'application/x-www-form-urlencoded;', function (response) { });
}
//获取系统信息
function GetSystemInfo() {
  var url = "/System/GetSystemInfo"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('GET', url, null, null, function (response) {
      resolve(response);
    }, 1);
  });
}
//修改系统信息
function EditSystemInfo(data) {
  var url = "/System/EditSystemInfo"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, null, function (response) {
      resolve(response);
    });
  });
}
//获取版本号
function GETVersion() {
  var url = "/System/GETVersion"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('GET', url, null, null, function (response) {
      resolve(response);
    }, 1);
  });
}

//获取日志信息
function GetErrorLog() {
  var url = "/Log/GetErrorLog"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('GET', url, null, null, function (response) {
      resolve(response);
    });
  });
}

//清空日志信息
function DeleteErrorLog(data) {
  var url = "/Log/DeleteErrorLog"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, null, function (response) {
      resolve(response);
    });
  });
}
//恢复出厂设置
function CheckPassWord(data) {
  var url = "/System/CheckPassWord"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, null, function (response) {
      resolve(response);
    });
  });
}
//获取日志信息
function GetRTULog() {
  var url = "/Log/GetRTULog"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('GET', url, null, null, function (response) {
      resolve(response);
    });
  });
}

//清空日志信息
function DeleteRTULog(data) {
  var url = "/Log/DeleteRTULog"
  return new Promise(function (resolve, reject) {
    sendAjaxRequest('POST', url, data, null, function (response) {
      resolve(response);
    });
  });
}